package com.xyl.chatrobot.controller;

import com.xyl.chatrobot.services.ChatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author xyl
 * @date 2020-12-14 21:23
 * @desc
 */
@Controller
public class ChatController {

    @Autowired
    private ChatService chatService;

    @GetMapping("chat")
    @ResponseBody
    public String chat(@RequestParam String content){
        return chatService.get(content);
    }
}
